package com.iespring.mapper.admin;

import com.iespring.bean.admin.goods.bo.DeleteGoodsBo;
import com.iespring.bean.admin.goods.bo.UpdateGoodsGoodsInfoBo;
import com.iespring.bean.admin.goods.vo.UpdateGoodsGoodsInfoVo;
import com.iespring.bean.admin.user.entity.MallGoods;
import com.iespring.bean.admin.user.entity.MallGoodsExample;

import java.util.List;

import com.iespring.bean.admin.user.vo.RowsGoodsBean;
import com.iespring.bean.app.user.vo.WxGoodsListVo;
import com.iespring.bean.app.user.vo.WxMallGoodsVo;
import com.iespring.bean.common.BasePageInfo;
import org.apache.ibatis.annotations.Param;

public interface MallGoodsMapper {
    long countByExample(MallGoodsExample example);

    int deleteByExample(MallGoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MallGoods record);

    int insertSelective(MallGoods record);

    List<MallGoods> selectByExample(MallGoodsExample example);

    MallGoods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MallGoods record, @Param("example") MallGoodsExample example);

    int updateByExample(@Param("record") MallGoods record, @Param("example") MallGoodsExample example);

    int updateByPrimaryKeySelective(MallGoods record);

    int updateByPrimaryKey(MallGoods record);

    Integer selectCount();

    List<RowsGoodsBean> selectGoodsStatistics();

    // 显示商品列表
    List<com.iespring.bean.admin.goods.po.MallGoods> showGoodsList(BasePageInfo basePageInfo);

    // 插入商品信息
    void addGoods(com.iespring.bean.admin.goods.po.MallGoods goods);

    // 修改goodsSn的值为商品id的值
    void updateGoodsSn(Integer goodsId);

    // 获取商品的主要信息
    UpdateGoodsGoodsInfoVo getUpdateGoodsGoodsInfo(@Param("id") Integer id);

    // 修改商品的主要信息
    void updateGoodsInfo(UpdateGoodsGoodsInfoBo goods);

    // 删除商品
    void deleteGoods(DeleteGoodsBo deleteGoodsBo);

    // 获取加入到购物车的商品信息
    com.iespring.bean.admin.goods.po.MallGoods getCartGoodsInfo(Integer goodsId);

    List<com.iespring.bean.admin.goods.po.MallGoods> selectIsHot();

    List<com.iespring.bean.admin.goods.po.MallGoods> selectIsNew();


    List<WxMallGoodsVo> selectGoodsByCategoryId(@Param("categoryId") Integer categoryId);

    List<WxMallGoodsVo> selectGoodsByCategoryIdLimitByPage(@Param("categoryId") Integer categoryId);

    List<WxMallGoodsVo> selectGoodsByIdLimitByPage(@Param("id") Integer id);

    List<WxMallGoodsVo> selectGoodsByBrandId(@Param("brandId") Integer brandId);

    List<WxMallGoodsVo> selectGoodsByKeyWord(@Param("pageInfo") BasePageInfo pageInfo, @Param("name") String name);
}
